package com.fdb.efp.nls.api.rest;

import com.fdb.basic.framework.core.constant.ResponseData;
import com.fdb.basic.framework.web.controller.AbstractController;
import com.fdb.efp.nls.service.facade.ColltDelayCaseAppService;
import com.fdb.efp.nls.service.vo.ColltDelayCaseAppVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@RestController
@RequestMapping("/api")
public class ColltDelayCaseAppController extends AbstractController {
	
	@Autowired
	@Qualifier("colltDelayCaseAppService")
	private ColltDelayCaseAppService colltDelayCaseAppService;

	/**
	 * 列表数据查询
	 * @param page
	 * @param size
	 * @return
	 */
	@RequestMapping(value="/collt/delay/case/apps", method=RequestMethod.POST)
	public @ResponseBody
    ResponseData<List<ColltDelayCaseAppVO>> queryColltDelayCaseAppAll(@RequestBody ColltDelayCaseAppVO vo) {
		List<ColltDelayCaseAppVO> outputVo = null;
		return getResponseData(outputVo);
		
	}
	
	/**
	 * 根据主键查询详情
	 * @return
	 */
	@RequestMapping(value="/collt/delay/case/app", method=RequestMethod.GET)
	public @ResponseBody
    ResponseData<ColltDelayCaseAppVO> queryByPk() {
		ColltDelayCaseAppVO inVo = new ColltDelayCaseAppVO();
		ColltDelayCaseAppVO outputVo = colltDelayCaseAppService.queryByPk(inVo);
		return getResponseData(outputVo);
		
	}
	
	/**
	 * 根据主键删除信息
	 * @param colltDelayCaseApp
	 * @return
	 */
	@RequestMapping(value="/collt/delay/case/app", method=RequestMethod.DELETE)
	public @ResponseBody
    ResponseData<Integer> deleteByPk(@RequestBody ColltDelayCaseAppVO inColltDelayCaseAppVo) {
		int outputVo = colltDelayCaseAppService.deleteByPk(inColltDelayCaseAppVo);
		return getResponseData(outputVo);
		
	}
	
	/**
	 * 根据主键更新信息
	 * @param inColltDelayCaseAppVo
	 * @return
	 */
	@RequestMapping(value="/collt/delay/case/app", method=RequestMethod.PUT)
	public @ResponseBody
    ResponseData<Integer> updateByPk(@RequestBody ColltDelayCaseAppVO inColltDelayCaseAppVo) {
		int outputVo = colltDelayCaseAppService.updateByPk(inColltDelayCaseAppVo);
		return getResponseData(outputVo);
		
	}
	
	/**
	 * 新增数据
	 * @param inColltDelayCaseAppVo
	 * @return
	 */
	@RequestMapping(value="/collt/delay/case/app", method=RequestMethod.POST)
	public @ResponseBody
    ResponseData<Integer> insertColltDelayCaseApp(@RequestBody ColltDelayCaseAppVO inColltDelayCaseAppVo) {
		int outputVo = colltDelayCaseAppService.insertColltDelayCaseApp(inColltDelayCaseAppVo);
		return getResponseData(outputVo);
		
	}

}
